import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import ArticleLayout from '@/components/article/Layout'
import ArticleArticle from '@/components/article/Article'
import ArticleAMenu from '@/components/article/Menu'
import Login from '@/components/Login'


Vue.use(Router)

export default new Router({
  // mode: 'history',
  linkActiveClass:"active",
  routes: [
    {
      path:"/",
      redirect:"/index"
    },
    {
      path: '/index',
      name: 'Hello',
      component: Home,
      meta:{title:"首页"},
      children:[
        {
          path:"/article",
          name:"article",
          component:ArticleLayout,
          redirect:"/article/library",
          meta:{title:"文章内容管理"},
          children:[
            { path:"library", name:"library",component:ArticleArticle,meta:{title:"文章管理"}},
            { path:"menu", name:"menu",component:ArticleAMenu,meta:{title:"栏目管理"}},
          ]
        },
        {path:"/login",component:Login,meta:{title:"登陆"}}
      ]
    },

  ]
})
